#ifndef Locate1_H
#define Locate1_H

#include "HalconCpp.h"
#include "common.h"

class LocateDfm
{
public:
	LocateDfm(std::string name, std::string path);
	int locate(Pose &pose, double rScaleMin, double rScaleMax, double cScaleMin,
		double cScaleMax, double minScole, double greediness);
private:
	HalconCpp::HTuple hv_ModelID;
	HalconCpp::HTuple hv_Pose;
	bool isModelLoaded;
	void saveResult();
};

class Locate1
{
public:
	Locate1();
	int loadModel();
	int locate(Pose &poseLocate);
private:
	HalconCpp::HTuple hv_ModelID;
	HalconCpp::HTuple  hv_Pose;//当前定位的位姿
	bool isModelLoaded;
	void saveResult();
};

class Locate2
{
public:
	Locate2();
	int loadModel();
	int locate(Pose &poseLocate);
private:
	HalconCpp::HTuple hv_ModelID, hv_ReusedModelID;
	HalconCpp::HTuple hv_ModelID_ugly;
	HalconCpp::HTuple hv_Pose;//当前定位的位姿
	bool isModelLoaded;
	void saveResult();
	void set_display_font(HalconCpp::HTuple hv_WindowHandle, HalconCpp::HTuple hv_Size, HalconCpp::HTuple hv_Font, HalconCpp::HTuple hv_Bold,
		HalconCpp::HTuple hv_Slant);
	void disp_message(HalconCpp::HTuple hv_WindowHandle, HalconCpp::HTuple hv_String, HalconCpp::HTuple hv_CoordSystem,
		HalconCpp::HTuple hv_Row, HalconCpp::HTuple hv_Column, HalconCpp::HTuple hv_Color, HalconCpp::HTuple hv_Box);

};

//定位销子
class Locate3
{
public:
	Locate3();
	int loadModel();
	int locate(Pose &poseLocate);
private:
	HalconCpp::HTuple hv_ModelID;
	HalconCpp::HTuple  hv_Pose;//当前定位的位姿
	bool isModelLoaded;
	void saveResult();

};

//定位连杆
class Locate4
{
public:
	Locate4();
	int loadModel();
	int locate(Pose &poseLocate);
private:
	HalconCpp::HTuple hv_ModelID;
	HalconCpp::HTuple  hv_Pose;//当前定位的位姿
	bool isModelLoaded;
	void saveResult();
	void set_display_font(HalconCpp::HTuple hv_WindowHandle, HalconCpp::HTuple hv_Size, HalconCpp::HTuple hv_Font, HalconCpp::HTuple hv_Bold,
		HalconCpp::HTuple hv_Slant);
	void disp_message(HalconCpp::HTuple hv_WindowHandle, HalconCpp::HTuple hv_String, HalconCpp::HTuple hv_CoordSystem,
		HalconCpp::HTuple hv_Row, HalconCpp::HTuple hv_Column, HalconCpp::HTuple hv_Color, HalconCpp::HTuple hv_Box);

};

#endif // Locate1_H
